using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using Sysgeprava.Entities;

namespace Sysgeprava.Repository.Mapping
{
    public class PAJILLAMap : EntityTypeConfiguration<PAJILLA>
    {
        public PAJILLAMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.CodToro)
                .IsRequired()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("PAJILLA");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.CodToro).HasColumnName("CodToro");
        }
    }
}
